<!doctype html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>基于Bootstrup的超酷jQuery开关按钮插件|DEMO_jQuery之家-自由分享jQuery、html5、css3的插件库</title>
    <script src="../../libs/jquery.min.js"></script>

    <link href="css/bootstrap-switch.css" rel="stylesheet">
    <script src="js/bootstrap-switch.js"></script>
    <style type="text/css">
    </style>
	<!--[if IE]>
		<script src="http://libs.useso.com/js/html5shiv/3.7/html5shiv.min.js"></script>
	<![endif]-->
</head>
<body>
	<input name="status" type="checkbox" data-size="small">  


	<script type="text/javascript">
	$('[name="status"]').bootstrapSwitch({  
        onText:"启动",  
        offText:"停止",  
        onColor:"success",  
        offColor:"info",  
        size:"small",  
        onSwitchChange:function(event,state){  
            if(state==true){  
                $(this).val("1");  
            }else{  
                $(this).val("2");  
            }  
        }  
    })  
	</script>
</body>
</html>